<%@ taglib prefix="c" uri="http://java.sun.com/jsp/jstl/core" %>
<%@ page language="java" pageEncoding="UTF-8"
		 contentType="text/html;charset=utf-8"%>
<!doctype html>
<html>
<head>
	<meta charset="utf-8">
	<meta name="viewport" content="initial-scale=1,minimum-scale=1,maximum-scale=1,user-scalable=no"/>
	<meta name="format-detection" content="telephone=no,address=no,email=no"/>
	<meta name="keywords" content="" />
	<meta name="description" content="" />
	<title>KAA电商管理后台_会员添加</title>
	<script type="text/javascript" src="${path}/js/jquery-2.1.1.min.js"></script>
	<script src="${path}/js/sidebar-menu.js"></script>
	<script src="${path}/js/uploadPreview.js"></script>
	<link href="${path}/css/login.css" rel="stylesheet" media="all">
</head>
<body class="main">
	<h1>KAA电商管理后台</h1>
	<jsp:include page="sidebarNav.jsp"></jsp:include><!-- main_sidebar -->

	<div class="main_con_wrap">
		<form name="form1" method="post"
			  action="${path}/updateAdvertisement" id="form1" enctype="multipart/form-data">
			<input id="id" name="id" style="display: none"value="${id}">
		<div class="main_con banneredit_adm">
			<div class="upload_img">
				<span class="title fl">本地图片上传：</span>
				<ul id="banner_img">
				  <li>
					<label for="up_img_WU_BANNER_0"></label>
					<input id="up_img_WU_BANNER_0" type="file" name="myFiles">
					<img id="imgShow_WU_BANNER_0" width="100%" height="100%">
				  </li>
				</ul>
				<div class="clear"></div>
			</div>
			<div class="upload_img">
				<span class="title fl">名称：</span>
				<div class="banner_link">
					<input id="advertisementName" type="text" name="advertisementName" value="${advertisement.adName}">
				</div>
				<div class="clear"></div>
			</div>
			<div class="upload_img">
				<span class="title fl">外部链接：</span>
				<div class="banner_link">
				  <input id="bannerLink" type="text" name="bannerLink" value="${advertisement.url}">
				</div>
				<div class="clear"></div>
			</div>
			<button name="button" class="banneredit_btn btn" type="submit" id="banneredit_btn">保存</button>
		</div><!-- main_con -->
		</form>
	</div><!-- main_con_wrap -->

	<div class="footer_copyright">
		<p>苏州知行合一网络科技有限公司提供技术支持，版权所有</p>
	</div><!-- footer_copyright -->

<script>
	/////////////////////////侧边栏按钮
	$.sidebarMenu($('.sidebar-menu'))
	
	
function file_click(){
	//Banner upload
	var BANNER = document.getElementById('banner_img');
	var BANNER_LI = BANNER.getElementsByTagName('li');
	for(var i=0; i<BANNER_LI.length;i++){
		new uploadPreview({ UpBtn: "up_img_WU_BANNER_"+i, ImgShow: "imgShow_WU_BANNER_"+i});		
	}
}
window.onload = file_click;
</script>
</body>
</html>